1. Field of the Invention
The present invention relates to a semiconductor memory such as a non-volatile memory, and specifically, to a semiconductor memory preventing unauthorized copying.
2. Description of the Background Art
In recent years, non-volatile memories are coming into wide use. Generally, from a non-volatile memory that permits random access, data written in the memory cells can be read, and therefore, unauthorized copying of the contents written in the non-volatile memory to another non-volatile memory is possible. As techniques for preventing such unauthorized copying, inventions are disclosed in Japanese Patent Laying-Open Nos. 11-203206, 2001-5729, and 3-73043.
In a security circuit of a non-volatile memory disclosed in Japanese Patent Laying-Open No. 11-203206, when information read by a read-out circuit indicates release of security, an output control part of the security circuit permits the data read by the read-out circuit to be output to the outside. When the information indicates a lock state of the security, it permits the data to be output to the outside if the data is detected to be all “0” by a first detection circuit at the time of program verify operation, or if the data is detected to be all “1” by a second detection circuit at the time of deletion verify operation.
In a non-volatile memory disclosed in Japanese Patent Laying-Open No. 2001-5729, a trap address is set in a password area. Reading from the password area is permitted only when an access is made not through the trap address. On the other hand, when an access is made by the trap address, reading from the password area is inhibited, a meaningless data is output, or the information in the password area is destroyed. Furthermore, the order of accessing to the password area can arbitrarily be set, such that reading from the password area is permitted only when an access is made in that set order. On the other hand, when an access is made in an order except for that set order, reading from the password area is inhibited, a meaningless data is output, or the information in the password area is destroyed.
In a data processing device disclosed in Japanese Patent Laying-Open No. 3-73043, a protection circuit made of a non-volatile memory element is provided, which has an extension prohibiting bit for setting whether the bus extension mode is prohibited or not and a protect bit for setting whether the data in the EPROM (Erasable and Programmable Read Only Memory) is made secret or not. It is configured such that the extension prohibiting bit is selected when a CPU (Central Processing Unit) mode is set. A read-out signal of the extension prohibiting bit is input to a mode control circuit, and when write is executed to the bit, a port is controlled so that the bus extension mode of the single chip microcomputer can be prohibited.
In a non-volatile memory not preventing unauthorized copying, data written in the memory cells can freely be read, and therefore, copying is easy if a ROM writer is used. Accordingly, there has been a problem that an unauthorized use by a person except for an authorized user is possible.
Furthermore, the above-mentioned patent documents only disclose inhibiting reading of the data stored in a non-volatile memory itself so that unauthorized copying is prevented. There may be a case, however, where copying of a non-volatile memory is permitted, while its operation only is desired to be inhibited.